1. Field of the Invention
This invention relates to digital circuits, and more particularly, to circuits that include combinational logic and flip-flops.
2. Description of the Related Art
Logic circuits are very well known in the art of electronics. Logic circuits can be divided into two main categories, combinational logic circuits and sequential logic circuits.
Combinational logic circuits include various types of common logic gates, such as AND, OR, NAND, and NOR gates. A combinational logic circuit can be a simple logic circuit having only a single gate, or can be a complex logic circuit having hundreds of gates arranged in various levels. Combinational logic circuits can be used to perform various functions such as addition, a bitwise AND or OR operation of two different operands, and so forth.
Sequential logic circuits include a wide variety of circuits whose operations depend not only on a present state of the inputs but a past state as well. One of the most common sequential circuits is the flip-flop. FIG. 1 is a logic diagram illustrating a common edge-triggered D-type flip-flop having a master-slave configuration. Data is latched into the master portion of the flip-flop during the low portion of the clock (‘clk’) signal, with the data received on the D input propagating to the NAND gate output labeled D′. When the clock goes high, the data from D′ propagates to the output Q. Thus, the D-type flip-flop shown is considered to be a positive edge triggered flip-flop, as the output changes (in accordance with the data input D) on the positive-going edge of the clock signal. Many other types of flip-flops (J-K, SR, T, etc.) are also well known in the art.
In many digital systems, the results of combinational logic operations must be propagated in a synchronous manner. This can be accomplished by coupling an output(s) of the combinational logic function to the input of a flip-flop, such as the D-type flip-flop discussed above. The result of the combinational logic function can then be conveyed by the flip-flop in a manner that is synchronous with a clock signal.